﻿using Prism.Regions;
using System.Windows;
using WPFTrain.Core;

namespace WPFTrain.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private readonly IRegionManager _regionManager;

        public MainWindow(IRegionManager regionManager)
        {
            InitializeComponent();
            _regionManager = regionManager;

            Loaded += MainWindow_Loaded;
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // 导航到火车动画视图
            _regionManager.RequestNavigate(RegionNames.ContentRegion, "TrainAnimationView");
        }
    }
}